package com.ruoyi.system.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.SysReportType;
import com.ruoyi.system.service.ISysReportTypeService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 举报类型字典（后台可维护）Controller
 * 
 * @author ruoyi
 * @date 2025-08-24
 */
@RestController
@RequestMapping("/front/reportType")
public class SysReportTypeController extends BaseController
{
    @Autowired
    private ISysReportTypeService sysReportTypeService;

    /**
     * 查询举报类型字典（后台可维护）列表
     */
    @GetMapping("/list")
    public TableDataInfo list(SysReportType sysReportType)
    {
        startPage();
        List<SysReportType> list = sysReportTypeService.selectSysReportTypeList(sysReportType);
        return getDataTable(list);
    }

    /**
     * 获取举报类型字典（后台可维护）详细信息
     */
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") String id)
    {
        return success(sysReportTypeService.selectSysReportTypeById(id));
    }
}
